<html><head><title>PauseThread</title></head>
<body bgcolor="#FFFFDF" link="#009999" vlink="#006666" alink="#006666">
<font face="Arial" size="2"><p align="center"><b><font size="4">PauseThread()</font></b></p>
<p><b>Syntax</b></p><blockquote>
<font color="#006666"><b>PauseThread</b></font>(Thread)</blockquote>

</blockquote>
<b>Description</b><br><blockquote>

Pauses the execution of the specified thread, previously created with <a href="createthread.html">CreateThread()</a>. The thread 
can be resumed with <a href="resumethread.html">ResumeThread()</a>. 

</blockquote><p><b>Parameters</b></p><blockquote>
<style type="text/css">
table.parameters { border-spacing: 0px; border-style: none; border-collapse: collapse; }
table.parameters td { border-width: 1px; padding: 6px; border-style: solid; border-color: gray; vertical-align: top; font-family:Arial; font-size:10pt; }
</style>
<table width="90%" class="parameters">
<tr><td width="10%"><i>Thread</i></td>
<td width="90%"> 
The thread to pause. This value is returned by <a href="createthread.html">CreateThread()</a>. 

</td></tr>
</table>
</blockquote><p><b>Return value</b></p><blockquote>
None.


</blockquote><p><b>Example</b></p><blockquote>

<pre><font face="Courier New, Courier, mono"size="2">  <b><font color="#006666">Procedure</font></b> <font color="#006666">PrintStuff</font>(*Dummy)
    <b><font color="#006666">For</font></b> i = 0 <b><font color="#006666">To</font></b> 10
<font color="#006666">      PrintN</font>(".")
<font color="#006666">      Delay</font>(200)
    <b><font color="#006666">Next</font></b>
  <b><font color="#006666">EndProcedure</font></b>
  
  <b><font color="#006666">If</font></b> <font color="#006666">OpenConsole</font>()
    thread =<font color="#006666"> CreateThread</font>(@PrintStuff(), 0)
    <b><font color="#006666">If</font></b> thread
<font color="#006666">      Delay</font>(100)
<font color="#006666">      PauseThread</font>(thread)
      <b><font color="#006666">For</font></b> i = 0 <b><font color="#006666">To</font></b> 10
<font color="#006666">        PrintN</font>("A")
<font color="#006666">        Delay</font>(50)
      <b><font color="#006666">Next</font></b>
      
      <font color="#006666">; Resume thread and give it enough time to complete</font>
<font color="#006666">      ResumeThread</font>(thread)
<font color="#006666">      Delay</font>(3000)
    <b><font color="#006666">EndIf</font></b>
  <b><font color="#006666">EndIf</font></b>
</font></pre>

</blockquote><p><b>See Also</b></p><blockquote>

<a href="resumethread.html">ResumeThread()</a>, <a href="createthread.html">CreateThread()</a> 

</Blockquote><p><b>Supported OS </b><Blockquote>All</Blockquote></p><center><- <a href=lockmutex.html>LockMutex()</a> - <a href=index.html>Thread Index</a> - <a href=resumethread.html>ResumeThread()</a> ->

</body></html>